﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace EnterTextValidated
{
    public partial class WebFormMain : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void button_Click(object sender, EventArgs e)
        {
            TextBox textBoxAdded = new TextBox();
            textBoxAdded.Text = Server.HtmlEncode(this.textBox.Text);
            Label LabelAdded = new Label();
            LabelAdded.Text = Server.HtmlEncode(this.textBox.Text);
            this.panelche.Controls.Add(textBoxAdded);
            this.panelche.Controls.Add(LabelAdded);
        }
    }
}